﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteTwoColumn.Master" Inherits="System.Web.Mvc.ViewPage<Beeldbankmvc.Models.EditAccountModel>" %>
<%@ Import Namespace="Beeldbankmvc.Helpers" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"><%=DynamicContent.getTitle(Request.Path) %></asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMiddleColumn" runat="server">
    <h1><%=DynamicContent.getTitle(Request.Path) %></h1>
    <%=DynamicContent.getBodyText(Request.Path)%>

    <p class="field-validation-error">Uw profiel is opgeslagen. </p>
                                                  
    <div id="register">

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>
        <%
            string header = null;
            if (Model != null)
            {
                if (Model.Header != null)
                    header = Model.Header;
            }            
           
            string country = null;
            if (Model != null)
            {
                if (Model.Country != null)
                    country = Model.Country;
            } 
                                  
            string factuurLand = null;
            if (Model != null)
            {
                if (Model.FactuurLand != null)
                    factuurLand = Model.FactuurLand;
            }  
        %>
        
        <fieldset>
            <legend>Account informatie</legend>
            
            <p>
                <label for="ddlHeader">Aanhef</label>
                <%: Html.DropDownList("ddlHeader", new SelectList(ViewData["HeaderList"] as IEnumerable, "Value", "Text", header))%>
                <%: Html.ValidationMessageFor(model => model.Header) %>
            </p>
            
            <p>
                <%: Html.LabelFor(model => model.FirstName) %>
                <%: Html.TextBoxFor(model => model.FirstName) %>
                <%: Html.ValidationMessageFor(model => model.FirstName) %>
            </p>
            <p>
                <%: Html.LabelFor(model => model.Prepositions) %>
                <%: Html.TextBoxFor(model => model.Prepositions)%>
                <%: Html.ValidationMessageFor(model => model.Prepositions)%>
            </p>
            <p>
                <%: Html.LabelFor(model => model.LastName) %>
                <%: Html.TextBoxFor(model => model.LastName) %>
                <%: Html.ValidationMessageFor(model => model.LastName) %>
            </p>

            <p>
                <%: Html.LabelFor(model => model.Email) %>
                <%: Html.TextBoxFor(model => model.Email)%>
                <%: Html.ValidationMessageFor(model => model.Email)%>
            </p>
            
            <p>
                <%: Html.LabelFor(model => model.Phone) %>
                <%: Html.TextBoxFor(model => model.Phone) %>
                <%: Html.ValidationMessageFor(model => model.Phone) %>
            </p>
            
            <p>
                <%: Html.LabelFor(model => model.Address) %>
                <%: Html.TextBoxFor(model => model.Address) %>
                <%: Html.ValidationMessageFor(model => model.Address) %>
            </p>
            
            <p>
                <%: Html.LabelFor(model => model.AddressNr) %>
                <%: Html.TextBoxFor(model => model.AddressNr) %>
                <%: Html.ValidationMessageFor(model => model.AddressNr) %>
            </p>
            
            <p>
                <%: Html.LabelFor(model => model.ZipCode) %>
                <%: Html.TextBoxFor(model => model.ZipCode) %>
                <%: Html.ValidationMessageFor(model => model.ZipCode) %>
            </p>
            
            <p>
                <%: Html.LabelFor(model => model.City) %>
                <%: Html.TextBoxFor(model => model.City) %>
                <%: Html.ValidationMessageFor(model => model.City) %>
            </p>
            
            <p>
                <label for="ddlCountry">Land</label>
                <%: Html.DropDownList("ddlCountry", new SelectList(ViewData["CountryList"] as IEnumerable, "Value", "Text", country))%>
                <%: Html.ValidationMessageFor(model => model.Country) %>
            </p>
            <p>
                <strong>Factuur adres</strong>
            </p>
            <p>
                <%: Html.LabelFor(model => model.CompanyName) %>
                <%: Html.TextBoxFor(model => model.CompanyName) %>
                <%: Html.ValidationMessageFor(model => model.CompanyName) %>
            </p>
            
            <p>
                <%: Html.LabelFor(model => model.FactuurAddress) %>
                <%: Html.TextBoxFor(model => model.FactuurAddress)%>
                <%: Html.ValidationMessageFor(model => model.FactuurAddress)%>
            </p>            
            
            <p>
                <%: Html.LabelFor(model => model.FactuurAddressNr)%>
                <%: Html.TextBoxFor(model => model.FactuurAddressNr)%>
                <%: Html.ValidationMessageFor(model => model.FactuurAddressNr)%>
            </p>
            
            <p>
                <%: Html.LabelFor(model => model.FactuurZipCode)%>
                <%: Html.TextBoxFor(model => model.FactuurZipCode)%>
                <%: Html.ValidationMessageFor(model => model.FactuurZipCode)%>
            </p>
            
            <p>
                <%: Html.LabelFor(model => model.FactuurCity)%>
                <%: Html.TextBoxFor(model => model.FactuurCity)%>
                <%: Html.ValidationMessageFor(model => model.FactuurCity)%>
            </p>
            
            <p>
                <label for="ddlFactuurLand">Land</label>          
                <%: Html.DropDownList("ddlFactuurLand", new SelectList(ViewData["CountryList"] as IEnumerable, "Value", "Text", factuurLand))%>
                <%: Html.ValidationMessageFor(model => model.FactuurLand)%>
            </p>            
            
        </fieldset>

        <p>
            <input type="submit" class="button" value="Opslaan" />
        </p>

    <% } %>
    </div>

</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolderRightColumn" runat="server">
</asp:Content>
